package com.itcast.trade.stock.admin.user.service;

import com.itcast.bulls.stock.common.exception.BusinessException;
import com.itcast.bulls.stock.common.exception.ComponentException;
import com.itcast.bulls.stock.entity.user.AuthorityUser;
import com.itcast.bulls.stock.entity.user.AuthorityUserRole;
import org.springframework.transaction.annotation.Transactional;

public interface IAuthorityLogicService {

    @Transactional(rollbackFor = Exception.class)
    void saveProvileges(String roleAuth, String... roleIds) throws BusinessException;

    /**
     * 分配用户与角色的关联关系接口
     * @param authorityUserRole
     * @param authorityUser:创建者
     * @throws ComponentException
     */
    void userAssignRoles(AuthorityUserRole authorityUserRole, AuthorityUser authorityUser) throws ComponentException;
}
